<template>
  <a-drawer
    title="企业信息"
    :maskClosable="false"
    width=650
    placement="right"
    :closable="true"
    @close="close"
    :visible="companyInfoVisiable"
    style="height: calc(100% - 55px);overflow: auto;padding-bottom: 53px;">
      <p><a-icon type="fire" />&nbsp;&nbsp;企业名称：{{companyInfoData.companyName}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;统一信用码：{{companyInfoData.unifiedCreditCode}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;地址：{{companyInfoData.companyAddr}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;企业性质：{{companyNature}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;法人代表名字：{{companyInfoData.companyLegalPerson}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;电话号码：{{companyInfoData.companyTe}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;传真号码：{{companyInfoData.companyFax}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;电邮：{{companyInfoData.companyEmail}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;生产许可编码：{{companyInfoData.companyLicense}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;企业人数：{{companyInfoData.companyPeople}}</p>
      <p :title="companyInfoData.companyMemo"><a-icon type="fire" />&nbsp;&nbsp;企业简介：{{companyInfoData.companyMemo}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;企业类别：{{companyType}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;所属区域：{{companyInfoData.zoneName}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;安监安监局：{{companyInfoData.officeName}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;经度：{{companyInfoData.companyLon}}</p>
      <p><a-icon type="fire" />&nbsp;&nbsp;经度：{{companyInfoData.companyLat}}</p>
      <p><a-icon type="clock-circle" />&nbsp;&nbsp;创建时间：{{companyInfoData.createTime}}</p>
      <p><a-icon type="clock-circle" />&nbsp;&nbsp;修改时间：{{companyInfoData.modifyTime? companyInfoData.modifyTime : '暂未修改'}}</p>
  </a-drawer>
</template>
<script>
export default {
  name: 'CompanyInfo',
  props: {
    companyInfoVisiable: {
      require: true,
      default: false
    },
    companyInfoData: {
      require: true
    }
  },
  data () {
    return {
      key: +new Date(),
      loading: true,
      checkedKeys: [],
      menuTreeData: []
    }
  },
  methods: {
    close () {
      this.$emit('close')
      this.checkedKeys = []
    }
  },
  computed: {
    companyNature () {
      switch (this.companyInfoData.companyNature) {
        case '1':
          return '国家行政企业'
        case '2':
          return '公私合作企业'
        default:
          return this.companyInfoData.companyNature
      }
    },
    companyType () {
      switch (this.companyInfoData.companyType) {
        case '1':
          return '有限责任公司'
        case '2':
          return '股份有限公司'
        default:
          return this.companyInfoData.companyType
      }
    }
  }
}
</script>
